//
//  SimPickerView.h
//
//  Created by LiuXubin on 15/9/1.
//

#import <UIKit/UIKit.h>
#import "SimDefine.h"

#ifndef CustomSimPickerSetting

SimDefineValue(kSimPickerItemColor, UIColor *)
SimDefineValue(kSimPickerContentColor, UIColor *)
SimDefineValue(kSimPickerTitleColor, UIColor *)


#endif

@class SimPickerView;

typedef CGFloat (^WidthForCol)(NSInteger col);
typedef int (^NumberOfCol)(void);
typedef int (^NumberOfRowForCol)(NSInteger col);
typedef NSString * (^ContentForColWithRow)(NSInteger col, NSInteger row);

typedef void(^PickerFinishBlock)(SimPickerView *pickerView);

@interface SimPickerView : UIView

- (id)initWithTitle:(NSString *)title;

@property (nonatomic, readonly) UIPickerView *pickerView;
@property (nonatomic, readonly) NSArray *selectedRows;
@property (nonatomic, readonly) NSArray *selectedContents;

@property (nonatomic, strong) WidthForCol widthForCol;
@property (nonatomic, strong) NumberOfCol numberOfCol;
@property (nonatomic, strong) NumberOfRowForCol numberOfRowForCol;
@property (nonatomic, strong) ContentForColWithRow contentForColWithRow;

@property (nonatomic, strong) PickerFinishBlock finishBlock;
@property (nonatomic, strong) PickerFinishBlock selecteBlock;
@property (nonatomic, strong) FinishBlock cancelBlock;

- (void)scrollToRows:(NSArray *)rows animated:(BOOL)animated;

@end
